/**
  ******************************************************************************
  * @file    DPC_DebugMode.h
  * @author  STMicroelectronics
  * @date    31-May-2022
  * @brief   This file contains type definitions for Debug Mode usage
  ******************************************************************************
  *
  * @copyright (c) 2022(-2023) STMicroelectronics.
  * All rights reserved.
  *
  * This software is licensed under terms that can be found in the LICENSE file in
  * the root directory of this software component.
  * If no LICENSE file comes with this software, it is provided AS-IS.
  ******************************************************************************
  *
  */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __DEBUGMODE_TYPE_H
#define __DEBUGMODE_TYPE_H

#ifdef __cplusplus
extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include <stdint.h>


/* Private includes ----------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/** 
  * @brief enum type definition, it lists all possible waveform debug status
  */
typedef enum WAVEFORM_STATE_t
{
  WAVEFORM_RECORD,
  WAVEFORM_PLAY,
  WAVEFORM_WAIT_FOR_TRIGGER
} WAVEFORM_STATE_t;

#define WAVEFORM_BUF_SIZE 128

/** 
  * @brief struct type definition, it contains all parameters regarding LED's blinking and state
  */
typedef struct WAVEFORM_DISPLAY_INFO_t
{
  uint16_t            m_Buf[2][WAVEFORM_BUF_SIZE];
  uint16_t            m_IndexRec;
  uint16_t            m_IndexPlay;
  uint16_t            m_IndexTrig;
  WAVEFORM_STATE_t    m_State;
} WAVEFORM_DISPLAY_INFO_t;


/* Exported macro ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Private defines -----------------------------------------------------------*/
/* Exported functions prototypes ---------------------------------------------*/
void WaveFormRecord(int32_t ChA, int32_t ChB);
void WaveFormTrigger(void);
void WaveFormDisplay(int32_t *pChA, int32_t *pChB);
#ifdef __cplusplus
}
#endif

#endif /* __DEBUGMODE_TYPE_H */
